QT       += core gui opengl

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets openglwidgets

CONFIG += c++17

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    camera.cpp \
    main.cpp \
    rgaresourcemanager.cpp \
    showcamera.cpp \
    widget.cpp

HEADERS += \
    camera.h \
    rgaresourcemanager.h \
    showcamera.h \
    widget.h

FORMS += \
    widget.ui

INCLUDEPATH += /usr/include/rockchip \
                /usr/include/aarch64-linux-gnu \
                /usr/include \
                /home/cat/c_project/rknn_lib/include \
                # /home/cat/c_lib/rknn_model_zoo/3rdparty/librga/include \
                /home/cat/c_lib/rknn_model_zoo/3rdparty/rknpu2/include



LIBS += \
    -lrockchip_mpp \
    -lavformat \
    -lavcodec \
    -lswscale \
    -lswresample \
    -lavutil \
    -ldrm \
    -lrga \
    -lz \
    -lEGL \
    -L"/home/cat/c_project/rknn_lib/lib" -lrknn_lib \
    -L"/home/cat/c_lib/rknn_model_zoo/3rdparty/rknpu2/Linux/aarch64" -lrknnrt \
    # -L"/home/cat/c_lib/rknn_model_zoo/3rdparty/librga/Linux/aarch64" -lrga \
    # -lMali \

# 添加 ARMv8-A 架构和 SIMD 指令集支持
QMAKE_CXXFLAGS += -march=armv8.2-a+simd+crypto+crc
QMAKE_CFLAGS   += -march=armv8.2-a+simd+crypto+crc

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += \
    shader.qrc
